<?php //strip
/**
 * Class that implements newsletter admin form.
 * 
 * @package odNewsletterWpPlugin
 * @subpackage odNewsletterWpPlugin_Forms
 * @author Ondrej Donek <ondrejd@gmail.com>
 */
class odNewsletterWpPlugin_Forms_Newsletter extends odWpPlugin_Form
{
  /**
   * Constructor - set up the newsletter form.
   * 
   * @global odCatalogWpPlugin $od_catalog_wpplugin
   * @return void
   */
	public function __construct()
	{
    global $od_catalog_wpplugin;
    
		parent::__construct(
		  'newsletter_form', 
		  '', 
		  array(
	      'ID' => array(
	        'type' => self::TYPE_HIDDEN,
	        'label' => null
	      ),
	      'op' => array(
	        'type' => self::TYPE_HIDDEN,
	        'label' => null
	      ),
	      'subject' => array(
	        'type' => self::TYPE_TEXT, 
	        'label' => __('Předmět:', $od_catalog_wpplugin->getId()),
	        'required' => true
	      ),
	      'recipients' => array(
	        'type' => self::TYPE_TEXTAREA, 
	        'label' => __('Příjemci:', $od_catalog_wpplugin->getId()),
	        'required' => true
	      ),
	      'text_body' => array(
	        'type' => self::TYPE_TEXTAREA, 
	        'label' => __('Textová verze obsahu:', $od_catalog_wpplugin->getId()),
	        'required' => true
	      ),
	      'html_body' => array(
	        'type' => self::TYPE_TINYMCE, 
	        'label' => __('HTML verze obsahu:', $od_catalog_wpplugin->getId()),
	        'required' => true
	      ),
	      'send_immediately' => array(
	        'type' => self::TYPE_CHECKBOX, 
	        'label' => __('Ihned odeslat', $od_catalog_wpplugin->getId()),
	        'required' => true
	      )
	    ), 
	    self::DECORATOR_SIMPLE,
	    new odNewsletterWpPlugin_Models_Newsletter()
		);
	}
} // End of odNewsletterWpPlugin_Forms_Newsletter
